/**
 * Project Name:trustsql_sdk_demo
 * File Name:Application.java
 * Package Name:com.tencent.trustsql.sdk.demo
 * Date:Jul 26, 20175:17:04 PM
 * Copyright (c) 2017, Tencent All Rights Reserved.
 *
 */
package com.tencent.trustsql.sdk.demo;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.tencent.trustsql.sdk.demo.command.Command;
import com.tencent.trustsql.sdk.demo.command.CommandFactory;

public class Application {

	private static final Log logger = LogFactory.getLog(Application.class);

	public static void main(String[] args) throws Exception {
		if (args != null && args.length > 0) {
			Command command = CommandFactory.getCommand(args[0]);
			if (command != null) {
				String result = command.execute(args);
				logger.info(String.format("application get result: %s", result));
			} else {
				logger.info(String.format("application doesn't support this argument: [%s]", args[0]));
			}
		}
	}

}
